package com.jarvan.service;

import com.jarvan.dto.TrainDto;
import com.jarvan.form.TrainForm;
import com.jarvan.model.Trains;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface TrainsService {
    Trains save(TrainForm trainForm);
    Page<Trains> findAll(Pageable pageable);
    Trains findOne(String trainId);
    void remove(String trainId);
    Page<Trains> findByStatus(Integer status, Pageable pageable);
    void recover(String trainId);
    List<Trains> findByStartAndEnd(String start, String end);
    List<TrainDto> findByDepartureAndDistination(String start, String end, String date);
}
